package pack1;

import java.util.List;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

public class sprg17 {
public static void main(String[] args) throws InterruptedException {
	WebDriver driver=new FirefoxDriver();
	 driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
	 driver.get("http://google.com");
	 driver.findElement(By.id("gbqfq")).sendKeys("selenium");
	 Thread.sleep(1000);
	 List<WebElement> allOption = driver.findElements(By.xpath("//td/span[contains(text(),'selenium')]"));
	 
	 for(int i=0;i<allOption.size();i++)
	 System.out.println(allOption.get(i).getText());
	 

}
	
}
